package com.attendance.pojo;

import com.attendance.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * 用户签到日志
 *
 * @author 今朝
 * @date 2021/03/23
 */
@EqualsAndHashCode(callSuper = true)
@Component
@TableName("t_task_user_log")
@Data
public class TaskUserLog extends BaseEntity {
    @TableId(type= IdType.INPUT)
    private Long taskId;
    private Long userId;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date logDate;
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "HH:mm:ss")
    private Date logTime;

    @TableField(exist = false)
    private String taskName;
    @TableField(exist = false)
    private String userName;
}